﻿using Elsa.Services.Models;
using Zhp.Workflow.Models;

namespace Zhp.Workflow.Services
{
    public interface IWorkflowService
    {
        public Task<RunWorkflowResult> StartWorkflowAsync<T>(long entityId);
        public Task<RunWorkflowResult> StartWorkflowAsync<T>(long entityId, string flowName);
        public Task<RunWorkflowResult> ContinueWorkflowAsync<T>(BaseApproveInfo approve);
        public Task<bool> CancelWorkflowAsync<T>(long entityId);
        public Task<bool> DeleteWorkflowAsync<T>(long entityId);
        public Task SetApproveInfo(IEnumerable<BaseWorkflowInfo> list);
        public Task<List<ApproveBookmark>> GetSelfPendingList();
        public Task<List<long>> GetSelfPendingEntityIdList();
        public Task<List<ApproveTimeLine>> GetApproveTimeLine<T>(long entityId);
        public Task<List<string>> QueryFlowNameSelect();
        public Task<int> PendingApproveCount();
        public Task<int> ApprovedCount();
        public Task<List<WorkflowEnumModel>> GetEnumList<T>();
    }
}
